<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .active {
            background: red;
        }
    </style>
</head>

<body>
    <div id="app">
        <div>
            <input type="text" v-model.lazy="name">
            <!-- pre作为一个html标签会将空白符，制表符保留进入 -->
            <pre>{{name}}</pre>
            <br>
            <input type="text" v-model.trim="nameAgain">
            <pre>{{nameAgain}}</pre>
            <br>
            <input type="text" v-model.number="price">
            <pre>{{price}}</pre>
        </div>
        <div>
            <!-- 单选 -->
            <label for="">
                男
                <input v-model="sex" name="sex" type="radio" value="male">

            </label>
            <label for="">
                女
                <input v-model="sex" name="sex" type="radio" value="female">
            </label>
            {{sex}}
        </div>
        <div>
            <!-- 多选 -->
            <label for="">
                男
                <input v-model="sex1" name="sex1" type="checkbox" value="male">

            </label>
            <label for="">
                女
                <input v-model="sex1" name="sex1" type="checkbox" value="female">
            </label>
            {{sex1}}
        </div>
        <div>
            <textarea v-model="article" name="" id="" cols="30" rows="10"></textarea>
        </div>
        <div>
            <select name="" id="" v-model="from">
                <option value="1">王家沟</option>
                <option value="2">背背山</option>
            </select>
            {{from}}
        </div>
        <div>
            <select name="" id="" v-model="dest" multiple>
                <option value="1">王家沟</option>
                <option value="2">背背山</option>
            </select>
            {{dest}}
        </div>
    </div>
</body>
<script src="../lib/vue.2.4.2.js"></script>
<script src="./js/main.js"></script>

</html>